import request from '/src/utils/request'

export function Register() {
    return request.get('/api/register');
}

export function Login(requestData) {
    // return request.post('/api/login');

    return request({
        url: "/user/login",
        method: "post",
        params: requestData
    });
}

//通过id查询接口
export function GetById(id) {
    return request.get("/user/"+id)
}

export function AddUser(requestData) {
    return request({
        url: "/user",
        method: "post",
        params: requestData
    });
}

// 修改配置接口
export function UpdateUser(requestData) {
    return request({
        url: "/user",
        method: "put",
        params: requestData
    });
}

export function DeleteUser(requestData) {
    return request({
        url: "/user",
        method: "delete",
        params: requestData
    });
}

export function List() {
    return request({
        url: "/user",
        method: "get"
    });
}